package businesslogicservice.registeryteacherservice;

import java.util.ArrayList;

import po.CourseClassification;
import po.Institute;
import po.LessonPO;
import po.StudentPO;
import vo.CourseVO;
import vo.FacultyTeacherVO;
import vo.LessonVO;
import vo.Message;
import vo.StrategyVO;
import vo.StudentVO;
import vo.TeacherVO;
import businesslogic.coursebl.CourseController;
import businesslogic.courseselectionbl.SelectController;
import businesslogic.strategybl.StrategyController;
import businesslogic.userbl.FacultyTeacherControl;
import businesslogic.userbl.StudentControl;
import businesslogic.userbl.TeacherControl;
import businesslogicservice.courseblservice.CourseBLService;
import businesslogicservice.courseselectionblservice.SelectBLService;
import businesslogicservice.strategyblservice.StrategyBLService;
import businesslogicservice.userblservice.FacultyTeacherBLService;
import businesslogicservice.userblservice.StudentBLService;
import businesslogicservice.userblservice.TeacherBLService;

public class RegisteryTeacherController implements RegisteryTeacherService {
	CourseBLService courseBL = new CourseController();
	TeacherBLService teacherBL = new TeacherControl();
	StudentBLService studentBL = new StudentControl();
	FacultyTeacherBLService facultyTeacherBL = new FacultyTeacherControl();
	SelectBLService courseSelectionBL = new SelectController();
	StrategyBLService StrategBL = new StrategyController();

	@Override
	public Message publishLesson(LessonVO vo) {
		Message message = courseBL.publishLesson(vo);
		return message;
	}

	@Override
	public Message deleteLesson(String lessonId, String term) {
		Message message = courseBL.deleteLesson(lessonId, term);
		return message;
	}

	@Override
	public Message modifyLesson(LessonVO vo) {
		Message message = courseBL.modifyLesson(vo);
		return message;
	}

	@Override
	public ArrayList<LessonPO> findLesson(
			CourseClassification courseClassification, String term) {
		ArrayList<LessonPO> list = courseBL.findLesson(courseClassification,
				term);
		return list;
	}

	@Override
	public ArrayList<LessonVO> findLesson(Institute institute, String term) {
		ArrayList<LessonVO> list = courseBL.findLesson(institute, term);
		return list;
	}

	public ArrayList<CourseVO> findCourse(Institute institute) {
		ArrayList<CourseVO> list = courseBL.findCourse(institute);
		return list;
	}

	@Override
	public Message insertStudent(StudentVO vo) {
		Message message = studentBL.insertStudent(vo);
		return message;
	}

	@Override
	public Message deleteStudent(String studentId) {
		Message message = studentBL.deleteStudent(studentId);
		return message;
	}

	@Override
	public Message modifyStudent(StudentVO vo) {
		Message message = studentBL.modifyStudent(vo);
		return message;
	}

	@Override
	public ArrayList<StudentPO> findStudent(Institute institute) {
		ArrayList<StudentPO> list = studentBL.findStudent(institute);
		return list;
	}

	@Override
	public Message insertTeacher(TeacherVO vo) {
		Message message = teacherBL.insertTeacher(vo);
		return message;
	}

	@Override
	public Message deleteTeacher(String teacherId) {
		Message message = teacherBL.deleteTeacher(teacherId);
		return message;
	}

	@Override
	public Message modifyTeacher(TeacherVO vo) {
		Message message = teacherBL.modifyTeacher(vo);
		return message;
	}

	@Override
	public TeacherVO findTeacher(String teacherId) {
		TeacherVO vo = teacherBL.findTeacher(teacherId);
		return vo;
	}

	@Override
	public ArrayList<TeacherVO> findTeacherByInstitute(Institute institute) {
		ArrayList<TeacherVO> list = teacherBL.findTeacherByInstitute(institute);
		return list;
	}

	@Override
	public Message insertFacultyTeacher(FacultyTeacherVO vo) {
		Message message = facultyTeacherBL.insertFacultyTeacher(vo);
		return message;
	}

	@Override
	public Message deleteFacultyTeacher(String facultyTeacherId) {
		Message message = facultyTeacherBL
				.deleteFacultyTeacher(facultyTeacherId);
		return message;
	}

	@Override
	public Message modifyFacultyTeacher(FacultyTeacherVO vo) {
		Message message = facultyTeacherBL.modifyFacultyTeacher(vo);
		return message;
	}

	@Override
	public ArrayList<FacultyTeacherVO> findFacultyTeacherByInstitute(
			Institute institute) {
		ArrayList<FacultyTeacherVO> list = facultyTeacherBL
				.findFacultyTeacherByInstitute(institute);
		return list;
	}

	@Override
	public boolean start() {
		boolean result = courseSelectionBL.start();
		return result;
	}

	@Override
	public boolean end() {
		boolean result = courseSelectionBL.end();
		return result;
	}

	@Override
	public boolean endQuitState() {
		boolean result = courseSelectionBL.endQuitState();
		return result;
	}

	@Override
	public boolean isStarted() {
		boolean result = courseSelectionBL.isStarted();
		return result;
	}

	@Override
	public boolean isQuitStarted() {
		boolean result = courseSelectionBL.isQuitStarted();
		return result;
	}

	@Override
	public Message updateStrategy(StrategyVO vo) {
		Message message = StrategBL.updateStrategy(vo);
		return message;
	}

	@Override
	public StrategyVO getStrategy() {
		StrategyVO vo = StrategBL.getStrategy();
		return vo;
	}

}
